package com.jilujia.domain.blog.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.jilujia.domain.blog.BlogCatalog;
import com.jilujia.framework.domain.JpaBusinessRepository;

@Repository
@Transactional(readOnly = true)
public interface BlogCatalogRepository extends JpaBusinessRepository<Long, BlogCatalog> {
	@Query("select b from BlogCatalog b where b.userId = :userId order by b.id")
	List<BlogCatalog> findCatalogsByUserId(@Param("userId") Long userId);

}
